import React, { Component } from 'react'
import UserList from './_base/UserList'
import { connect } from 'react-redux'
import { getAllUsersListAsync } from '../../../_redux/actions_async'

class AdminUserPage extends Component {
  constructor (props) {
    super(props)
  }

  componentWillMount () {
    this.props.getAllUsersListAsync()
  }

  render () {
    return (
      <div>
        <UserList userList={this.props.userList}/>
      </div>
    )
  }
}

AdminUserPage.propTypes = {}

AdminUserPage = connect(
  ({ $AdminPageState: { userList } }) => ({ userList }),
  { getAllUsersListAsync }
)(AdminUserPage)

export default AdminUserPage
